<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script>
        var student =function(name,id,sex,grade){
            this.name=name,
            this.id=id,
            this.sex=sex,
            this.grade=grade,
            this.sayHi= function(){
                console.log(`Hi~ o(*￣▽￣*)ブ`);
            }
        }
        var xiaoming= new student('小明','20171983','男','小学三年级')
        alert(`你好我是${xiaoming.name}`);
        xiaoming.sayHi();
    </script>
</head>
<body>
    
</body>
</html>